home *** CD-ROM | disk | FTP | other *** search
- #ifndef NULLSESSION
- #include <stdio.h>
- #include "global.h"
- #include "ftpcli.h"
- #include "telnet.h"
- #include "icmp.h"
- #include "ax25.h"
- #include "ax25tnc.h"
- #include "proc.h"
-
- /* Session control structure; only one entry is used at a time */
- struct session {
- int type;
- #define FREE 0
- #define TELNET 1
- #define FTP 2
- #define AX25TNC 3
- #define FINGER 4
- #define PING 5
- #define NRSESSION 6
- char *name; /* Name of remote host */
- union {
- struct ftpcli *ftp;
- struct telnet *telnet;
- struct ax25tnc *ax25;
- struct proc *finger;
- struct ping *ping;
- } cb;
- int s; /* Network socket (control for FTP) */
- struct mbuf *input; /* Console input */
- FILE *record; /* Receive record file */
- char *rfile; /* Record file name */
- FILE *upload; /* Send file */
- char *ufile; /* Upload file name */
- int ttymode; /* Raw or cooked */
- };
- #define NULLSESSION (struct session *)0
-
- extern char *Sestypes[];
- extern unsigned Nsessions;
- extern struct session *Sessions;
- extern struct session *Current;
- extern int Mode;
- #define CMD_MODE 1 /* Command mode */
- #define CONV_MODE 2 /* Converse mode */
-
- /* In session.c: */
- void freesession __ARGS((struct session *sp));
- struct session *sessptr __ARGS((char *cp));
- struct session *newsession __ARGS((char *name,int type));
-
- extern int16 Lport;
- #define ALERT_EOF 1
-
-
- #endif /* NULLSESSION */
-